package org.jeecg.modules.api.factory;

import org.jeecg.modules.api.IManageBaseAPI;
import org.jeecg.modules.api.fallback.ManageBaseAPIFallback;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * @Description: BusinessBaseAPIFallbackFactory
 * @author: yfkj
 */
@Component
public class ManageBaseAPIFallbackFactory implements FallbackFactory<IManageBaseAPI> {

    @Override
    public IManageBaseAPI create(Throwable throwable) {
        ManageBaseAPIFallback fallback = new ManageBaseAPIFallback();
        fallback.setCause(throwable);
        return fallback;
    }
}